package com.cskaoyan.exception;

import com.cskaoyan.bean.BaseRespVo;
import org.apache.shiro.authz.AuthorizationException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author
 * @date 2020/12/7 19:53
 */
@ControllerAdvice
public class ExceptionControllerAdvise {
    @ExceptionHandler(AuthorizationException.class)
    @ResponseBody
    public BaseRespVo handlerAuthorException(Exception e){
        return BaseRespVo.fail605();
    }
}
